<?php

class MapingData {
    function mapData($data){
        $result = "";
       if($data == "bw" || $data =="cn" || $data =="ew"){
           $result = " LIKE ";
       }else if($data == "eq"){
           $result = " = ";
       }else if($data == "ne"){
           $result = " <> ";
       }else if($data == "lt"){
           $result = " < ";
       }else if($data == "le"){
           $result = " <= ";
       }else if($data == "gt"){
           $result = " > ";
       }else if($data == "ge"){
           $result = " >= ";
       }
       return $result;
    }
    function likeCondition($condition,$date){
        $result = "";
        if($condition == "bw"){
            $result = "LIKE ".$date."%";
        }else if($condition == "cn"){
            $result = "LIKE %".$date."%";
        }else if($condition == "ew"){
            $result = "LIKE %".$date."";
        }
        return $result;
    }
}
?>
